<template>
	<div v-loading="loading">
		<div class="content-top">
			<span class="h1">报表查询</span>
			<span class="h2">报销统计结算表</span>
		</div>

			<div class="title">
				统计表1 （ {{proStr}} ）项目征地拆迁补偿款报销结算表
			</div>
			<div class="fbhead">
				<div class="address clearfix">
					<label for="">工程项目:</label>
					<el-select v-model="proValue" placeholder="请选择" filterable @change='change'>
						<el-option v-for="item in project" :key="item.ID" :label="item.Name" :value="item.ID">
						</el-option>
					</el-select>
					<label for="">行政区域:</label>
					<el-cascader :options="regions" v-model="region" separator='-' :disabled="userType==3||userType==2" @change="handleItemChange" change-on-select filterable clearable></el-cascader>
					

					<el-button type="primary" size="small" @click="upper" v-if="index>0">前一期</el-button>
					<el-button type="primary" size="small" disabled v-else>前一期</el-button>
					<span class="stage">第&nbsp;{{index+1}}&nbsp;期</span>
					<span class="stage">共&nbsp;{{PageSize}}&nbsp;期</span>
					<el-button type="primary" size="small" @click="next" v-if="index+1!=PageSize">后一期</el-button>
					<el-button type="primary" size="small" disabled v-else>后一期</el-button>
					<span class="date">{{stage|$toMoment}}</span>
					<span class="fr">{{datas | Format}}</span>
					<el-button type="primary" size="small" @click="fnPrint()" v-show="userType==3||userType==1">打印</el-button>
					第<el-input v-model="indexs" placeholder="" style='width: 50px;text-align: center;'></el-input>期
					<el-button type="primary" size="small" @click="fnSerach">查询</el-button>

				</div>
			</div>
			<div class="tables">
				<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
					<thead>
						<tr>
							<th rowspan="3">序号</th>
							<th rowspan="3">地址</th>
							<th rowspan="3">分表编号</th>
							<th rowspan="3">姓名</th>
							<th rowspan="3">银行账号</th>
							<th rowspan="3">合计补偿</th>
							<th rowspan="2">1土地征用</th>
							<th rowspan="2">3房屋主体</th>
							<th colspan="15">补偿费用</th>
						</tr>
						<tr>
							<th colspan="1">1土地征用</th>
							<th colspan="1">2竹木果树类</th>
							<th colspan="1">3房屋主体</th>
							<th colspan="1">4房屋附属</th>
							<th colspan="1">5迁坟补偿</th>
							<th colspan="1">6特殊征拆</th>

							<!-- <th rowspan="2">合计补偿</th> -->
						</tr>
						<tr>
							<th>(㎡)</th>
							<th>(当量㎡)</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>

						</tr>
					</thead>
					<tbody>
						<tr v-for="(item,index) in DataRows" :key="index">
							<td>{{index+1}}</td>
							<td>{{item.Address}}</td>
							<td>{{item.FlowBillCode}}</td>
							<td>{{item.frominfo.MainName}}</td>
							<td v-if="item.frominfo.BankAccount!='未填写'">{{item.frominfo.BankAccount}}</td>
							<td v-else></td>
							<td>{{item.TotalMoney}}</td>

							<td>{{item.LandAmount}}</td>
							<td>{{item.HouseAmount}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.LandMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.GreenMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.HouseMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.HouserExMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.GraveMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.OtherMoney}}</td>
							<!-- <td>{{item.TotalMoney}}</td> -->
						</tr>
					</tbody>
					<tfoot>
						<tr>
							<th rowspan="2">序号</th>
							<th rowspan="2">地址</th>
							<th rowspan="2">分表编号</th>
							<th rowspan="2">姓名</th>
							<th rowspan="2">银行账号</th>
							<th rowspan="2">合计补偿</th>

							<th>1土地征用</th>
							<th>3房屋主体</th>
							<th>1土地征用</th>
							<th>2竹木果树类</th>
							<th>3房屋主体</th>
							<th>4房屋装饰</th>
							<th>5迁坟补偿</th>
							<th>6特殊征拆</th>
							<!-- <th rowspan="2">合计补偿</th> -->
						</tr>
						<tr>
							<th>(㎡)</th>
							<th>(当量㎡)</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
						</tr>
						<tr>
							<th colspan="5">本期支付结算合计</th>
							<th>{{SumRow.TotalMoney}}</th>
							<th>{{SumRow.LandAmount}}</th>
							<th>{{SumRow.HouseAmount}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.LandMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.GreenMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.HouseMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.HouserExMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.GraveMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.OtherMoney}}</th>
							<!-- <th>{{SumRow.TotalMoney}}</th> -->
						</tr>
						<tr>
							<th colspan="5">本期支付结算合计大写</th>
							<th colspan="9" style="font-weight: 600;">{{TotalUpper}}</th>
						</tr>
						<tr style="background: #f56c6c; color: #fff;">
							<th colspan="5">财务收回往期冲抵</th>
							<th colspan="1" style="font-weight: 600;">{{SumRow.AllMoney}}</th>
							<th style="font-weight: 600;" colspan="8">{{SumRow.AllMemo}}</th>
						</tr>
						<tr>
							<th colspan="5">结算累计</th>
							<th>{{TotalRow.TotalMoney}}</th>
							<th>{{TotalRow.LandAmount}}</th>
							<th>{{TotalRow.HouseAmount}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.LandMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.GreenMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.HouseMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.HouserExMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.GraveMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.OtherMoney}}</th>
							<!-- <th>{{TotalRow.TotalMoney}}</th> -->
						</tr>
						<tr class="bordernone">
							<td colspan="2">镇财务制表：</td>
							<td colspan="1"></td>
							<td colspan="2">镇财务复核：</td>
							<td colspan="1"></td>
							<td colspan="2">镇分管领导：</td>
							<td colspan="2"></td>
							<td colspan="2">镇政府盖章（镇长签名）：</td>
							<td colspan="2"></td>
						</tr>
						<tr class="bordernone">
							<td colspan="2">县征地办出纳审核：</td>
							<td colspan="1"></td>
							<td colspan="2">县征地办会计审核：</td>
							<td colspan="1"></td>
							<td colspan="2">县征地办分管领导：</td>
							<td colspan="2"></td>
							<td colspan="2">县征地办盖章（主任签字）：</td>
							<td colspan="2"></td>
						</tr>
						<tr class="bordernone">
							<td colspan="2">业主协调部审核：</td>
							<td colspan="1"></td>
							<td colspan="2">业主财务审核：</td>
							<td colspan="1"></td>
							<td colspan="2">业主分管领导：</td>
							<td colspan="2"></td>
							<td colspan="2">业主盖章（领导签字）：</td>
							<td colspan="2"></td>
						</tr>
						<tr class="bordernone" height="200px">
							<td colspan="2">备注：</td>
							<td colspan="12"></td>
						</tr>
					</tfoot>
				</table>
			</div>
		<div id="print" v-show='false'>
			<div class="title">
				统计表1 （ {{proStr}} ）项目征地拆迁补偿款支付结算表
			</div>
			<div class="fbhead">
				<div class="address clearfix">
					<label for="" v-if="!userType==3">工程项目:</label>
					<span v-if="!userType==3" style="display: inline-block; width: 220px;border: 1px solid #dcdfe6;border-radius: 5px;padding: 5px 7px;">{{gcxms}}</span>
					<label for="">行政区域:</label>
					<span style="display: inline-block; width: 220px;border: 1px solid #dcdfe6;border-radius: 5px;padding: 5px 7px;">{{str}}</span>
					<!--<el-cascader :options="regions" v-model="region" separator='-' change-on-select filterable clearable></el-cascader>-->
					<el-button type="primary" size="small" @click="fnSerach">查询</el-button>

					<el-button type="primary" size="small" @click="upper" v-if="index>0">前一期</el-button>
					<el-button type="primary" size="small" disabled v-else>前一期</el-button>
					<span class="stage">第&nbsp;{{index+1}}&nbsp;期</span>
					<span class="stage">共&nbsp;{{PageSize}}&nbsp;期</span>
					<el-button type="primary" size="small" @click="next" v-if="index+1!=PageSize">后一期</el-button>
					<el-button type="primary" size="small" disabled v-else>后一期</el-button>
					<span class="date">{{stage|$toMoment}}</span>
					<span class="fr">{{datas | Format}}</span>
					<el-button type="primary" size="small" @click="fnPrint()" v-show="userType==3||userType==1">打印</el-button>

				</div>
			</div>
			<div class="tables">
				<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
					<thead>
						<tr>
							<th rowspan="3">序号</th>
							<th rowspan="3">地址</th>
							<th rowspan="3">分表编号</th>
							<th rowspan="3">姓名</th>
							<th rowspan="3">银行账号</th>
							<th rowspan="3">合计补偿</th>
							<th rowspan="2">1土地征用</th>
							<th rowspan="2">3房屋主体</th>
							<th colspan="15">补偿费用</th>
						</tr>
						<tr>
							<th colspan="1">1土地征用</th>
							<th colspan="1">2竹木果树类</th>
							<th colspan="1">3房屋主体</th>
							<th colspan="1">4房屋附属</th>
							<th colspan="1">5迁坟补偿</th>
							<th colspan="1">6特殊征拆</th>

							<!-- <th rowspan="2">合计补偿</th> -->
						</tr>
						<tr>
							<th>(㎡)</th>
							<th>(当量㎡)</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>

						</tr>
					</thead>
					<tbody>
						<tr v-for="(item,index) in DataRows" :key="index">
							<td>{{index+1}}</td>
							<td>{{item.Address}}</td>
							<td>{{item.FlowBillCode}}</td>
							<td>{{item.frominfo.MainName}}</td>
							<td v-if="item.frominfo.BankAccount!='未填写'">{{item.frominfo.BankAccount}}</td>
							<td v-else></td>
							<td>{{item.TotalMoney}}</td>

							<td>{{item.LandAmount}}</td>
							<td>{{item.HouseAmount}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.LandMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.GreenMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.HouseMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.HouserExMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.GraveMoney}}</td>
							<!-- <td>{{item.FlowBillCode}}</td> -->
							<td>{{item.OtherMoney}}</td>
							<!-- <td>{{item.TotalMoney}}</td> -->
						</tr>
					</tbody>
					<tfoot>
						<tr>
							<th rowspan="2">序号</th>
							<th rowspan="2">地址</th>
							<th rowspan="2">分表编号</th>
							<th rowspan="2">姓名</th>
							<th rowspan="2">银行账号</th>
							<th rowspan="2">合计补偿</th>

							<th>1土地征用</th>
							<th>3房屋主体</th>
							<th>1土地征用</th>
							<th>2竹木果树类</th>
							<th>3房屋主体</th>
							<th>4房屋装饰</th>
							<th>5迁坟补偿</th>
							<th>6特殊征拆</th>
							<!-- <th rowspan="2">合计补偿</th> -->
						</tr>
						<tr>
							<th>(㎡)</th>
							<th>(当量㎡)</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
							<!-- <th>分表编号</th> -->
							<th>金额（元）</th>
						</tr>
						<tr>
							<th colspan="5">本期支付结算合计</th>
							<th>{{SumRow.TotalMoney}}</th>
							<th>{{SumRow.LandAmount}}</th>
							<th>{{SumRow.HouseAmount}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.LandMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.GreenMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.HouseMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.HouserExMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.GraveMoney}}</th>
							<!-- <th></th> -->
							<th>{{SumRow.OtherMoney}}</th>
							<!-- <th>{{SumRow.TotalMoney}}</th> -->
						</tr>
						<tr>
							<th colspan="5">本期支付结算合计大写</th>
							<th colspan="9" style="font-weight: 600;">{{TotalUpper}}</th>
						</tr>
						<tr>
							<th colspan="5">财务收回往期冲抵</th>
							<th colspan="1" style="font-weight: 600;">{{SumRow.AllMoney}}</th>
							<th style="font-weight: 600;" colspan="8">{{SumRow.AllMemo}}</th>
						</tr>
						<tr>
							<th colspan="5">结算累计</th>
							<th>{{TotalRow.TotalMoney}}</th>
							<th>{{TotalRow.LandAmount}}</th>
							<th>{{TotalRow.HouseAmount}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.LandMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.GreenMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.HouseMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.HouserExMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.GraveMoney}}</th>
							<!-- <th></th> -->
							<th>{{TotalRow.OtherMoney}}</th>
							<!-- <th>{{TotalRow.TotalMoney}}</th> -->
						</tr>
						<tr class="bordernone" height="54px">
							<td colspan="2">镇财务制表：</td>
							<td colspan="1"></td>
							<td colspan="2">镇财务复核：</td>
							<td colspan="1"></td>
							<td colspan="2">镇分管领导：</td>
							<td colspan="2"></td>
							<td colspan="2">镇政府盖章（镇长签名）：</td>
							<td colspan="2"></td>
						</tr>
						<tr class="bordernone" height="54px">
							<td colspan="2">县征地办出纳审核：</td>
							<td colspan="1"></td>
							<td colspan="2">县征地办会计审核：</td>
							<td colspan="1"></td>
							<td colspan="2">县征地办分管领导：</td>
							<td colspan="2"></td>
							<td colspan="2">县征地办盖章（主任签字）：</td>
							<td colspan="2"></td>
						</tr>
						<tr class="bordernone" height="54px">
							<td colspan="2">业主协调部审核：</td>
							<td colspan="1"></td>
							<td colspan="2">业主财务审核：</td>
							<td colspan="1"></td>
							<td colspan="2">业主分管领导：</td>
							<td colspan="2"></td>
							<td colspan="2">业主盖章（领导签字）：</td>
							<td colspan="2"></td>
						</tr>
						<tr class="bordernone" height="200px">
							<td colspan="2">备注：</td>
							<td colspan="12"></td>
						</tr>
					</tfoot>
				</table>
			</div>
		</div>
	</div>
</template>
<script>
	import api from "../../axios/api";
	var moment = require('moment');
	export default {
		name: "PayReport",
		data() {
			return {
				datas: new Date,
				loading: false,
				regions: [], //当前选择区域值
				region: [],
				project: [],
				proValue: "",
				proStr: '',
				index: 0,
				PageSize: '',
				stage: '',
				dataHead: [],
				DataRows: [], //明细行
				SumRow: '', //合计行
				TotalRow: '', //累计行
				TotalUpper: '', //合计大写
				printState: true,
				userType: 1,
				gcxms: '',
				shows: true,
				quy:'',
				vals:[],
				str:'',
				indexs:1,
				shouye:[]
			};
		},
		watch: {
			proValue: function(newVal, oldVal) {
				for(var i = 0; i < this.project.length; i++) {
					if(this.proValue == this.project[i].ID) {
						this.gcxms = this.project[i].Name
					}
				}
			},
			vals:function(newVal, oldVal){
				this.str = ''
				for(var i = 0;i<this.vals.length;i++){
					this.str+=this.vals[i].label+'-'
				}
				this.str = this.str.substring(0,this.str.length-1);
				console.log(this.str)
			}
		},
		filters: {
			$toMoment: function(fmt) {
				if(fmt) {
					let date = new Date(fmt);
					let y = date.getFullYear()
					let m = date.getMonth() + 1;
					let d = date.getDate();
					return y + '-' + m + '-' + d;
				} else {
					return ''
				}
			},
			Format: function(fmt) {
				if(fmt) {
					let date = new Date(fmt);
					let y = date.getFullYear()
					let m = date.getMonth() + 1
					let d = date.getDate()
					let s = date.getHours() // 小时
					let f = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() // 分
					let g = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() // 秒
					return y + '-' + m + '-' + d + ' ' + s + ':' + f + ':' + g;
				} else {
					return ''
				}
			}
		},
		mounted() {
			setInterval(() => {
				this.datas = new Date()
			}, 1000)
			this.zList();
			this.userType = sessionStorage.UserType;
		},
		methods: {
			getParent(){
				this.$get(api.getParent+'/'+sessionStorage.RegionID).then(res=>{
					if(res.data.state==200){
						for(var i = 0;i<res.data.Data.length;i++){
							console.log(res.data.Data[i])
							this.region.push(res.data.Data[i].ID)
						}
						this.region.reverse()
						this.region[this.region.length] = parseInt(sessionStorage.RegionID) 
						this.vals=this.getCascaderObj(this.region, this.regions);
						this.paymaster()
					}else{
						this.$message.error(res.data.msg);
					}
				})
			},
			getCascaderObj(val,opt) {
	            var s  = val.map(function (value, index, array) {
	                for (var itm of opt) {
	                    if (itm.value == value) { opt = itm.children; return itm; }
	                }
	                return null;
	            });
	            console.log(s)
	            return s
	        },
			handleItemChange() {
                    this.vals=this.getCascaderObj(this.region, this.regions);
            },
			fnSerach() {
				console.log(this.indexs)
				for(let i = 0; i < this.project.length; i++) {
					if(this.proValue == this.project[i].ID) {
						this.proStr = this.project[i].Name
					}
				}
				this.index = this.indexs-1
				this.paymaster()
			},
			//工程项目列表
			zList() {
				this.$post(api.getlistde).then(response => {
					if(response.isOK == true && response.state == 200) {
						this.project = response.Data;
						this.loading = false;
						this.proValue = this.project[0].ID
						console.log(this.proValue)
						this.anonymousget(this.proValue)
						this.proStr = this.project[0].Name
						
					} else {
						this.loading = false;
						this.$message.error(response.msg);
					}
				}).catch((error) => {
					this.loading = false;
				})

			},
			change() {
				this.anonymousget(this.proValue)
			},
			//获取行政区域
			anonymousget(val) {
				this.regions = [];
				this.region = [];
				if(!val) {
					return false;
				}
				this.$get(api.anonymousget + "/" + val).then(response => {
					if(response.data.isOK == true && response.data.state == 200) {
						for(var i = 0; i < response.data.Data.length; i++) {
							this.regions.push({
								label: response.data.Data[i].RegionName,
								value: response.data.Data[i].ID,
								ParentID: response.data.Data[i].ParentID
							});
						}
						console.log(this.regions)
						this.regions = this.$toTree(this.regions);
						if(sessionStorage.UserType==3||sessionStorage.UserType==2){
							this.getParent()
						}else{
							this.region.push(this.regions[0].value);
							this.paymaster()
							this.vals=this.getCascaderObj(this.region, this.regions);
						}
						
					} else {
						this.$message.error(response.data.msg);
					}
				}).catch((error) => {
					this.loading = false;
				})
			},
			changePro() {},
			upper() {
				console.log(this.indexs)
				console.log(this.index)
				if(this.index < 1) {
					this.index = 0;
				} else {
					this.index = this.index - 1;
					this.indexs = this.index+1
					this.paymaster()
				}
			},
			next() {
				if(this.index == this.PageSize) {
					this.index = this.PageSize;
					this.indexs = this.PageSize
				} else {
					this.index = this.index + 1;
					this.indexs = this.index+1
					this.paymaster()
				}
			},
			//表头
			paymaster() {
				this.$post(api.paymaster, {
					    "Para": {
						    "RegionID": this.region[this.region.length-1],
						    "ProjectID": this.proValue
					    },
						PageSize: 1,
						PageIndex: this.index,
						OrderString: "",
						ToExcel: false
					})
					.then(response => {
						if(response.isOK == true && response.state == 200) {
							this.PageSize = response.Data.Pages;
							if(response.Data.Data.length > 0) {
								console.log(response)
								this.dataHead = response.Data.Data;
								// this.stage=moment(response.Data.Data[0].BillDate).format('YYYY年MM月DD日')
								this.stage = response.Data.Data[0].BillDate
								this.getPayData(response.Data.Data[0].BillCode, this.region[this.region.length - 1])
							} else {
								this.DataRows = [];
								this.SumRow = '';
								this.TotalRow = '';
								this.$message.error('没有数据');
							}
						} else {
							this.$message.error(response.msg);
						}
					})
					.catch(error => {});
			},
			getPayData(code, regid) {
				console.log(regid)
				this.loading = true;
				this.$get(api.paydata + "/" + code + '/' + regid)
					.then(response => {
						if(response.data.isOK == true && response.data.state == 200) {
							this.DataRows = response.data.Data.DataRows; //明细行
							this.SumRow = response.data.Data.SumRow; //合计行
							this.TotalUpper = this.$toMoney(this.SumRow.TotalMoney)
							this.TotalRow = response.data.Data.TotalRow; //累计行
							this.loading = false;
						} else {
							this.loading = false;
							this.DataRows = [];
							this.SumRow = '';
							this.TotalRow = '';
							this.$message.error(response.data.msg);
						}
					})
					.catch(error => {
						this.loading = false;
					});
			},
			fnPrint() {
				this.shows = false
				$('.fbhead').css('paddingLeft', '90px')
				$('.tables').css('paddingLeft', '90px')
				$('.tables table').css('color', '#000')
				$('.tables table td').css('borderColor', '#000')
				$('.tables table th').css('borderColor', '#000')

				setTimeout(function() {
					let subOutputRankPrint = document.getElementById("print");
					let newContent = subOutputRankPrint.innerHTML;
					let oldContent = document.body.innerHTML;
					document.body.innerHTML = newContent;
					window.print();
					window.location.reload();
					document.body.innerHTML = oldContent;
					return false;
				}, 0)
			}
		}
	};
</script>
<style scoped>
	.fbhead {
		/* width: 100%; */
		min-width: 1680px;
		/*width:2500px;*/
		color: #000;
		margin: auto;
		font-size: 12px;
	}
	
	.address {
		margin: 10px 0;
	}
	
	.title {
		width: 100%;
		font-size: 20px;
		text-align: center;
		font-weight: 600;
		margin: 10px auto;
		color: #909399;
	}
	
	.stage {
		display: inline-block;
		padding: 0 10px;
	}
	
	.date {
		display: inline-block;
		padding: 0 10px;
		line-height: 40px;
		font-size: 13px;
	}
	
	.tables {
		/* width: 100%; */
		min-width: 1680px;
	}
	
	.tables table {
		color: #606266;
		margin: auto;
		border-collapse: collapse;
		font-size: 12px;
	}
	
	.tables table td,
	.tables table th {
		text-align: center;
		padding: 5px;
		border: 1px solid #ebeef5;
	}
</style>